from abc import ABC, abstractmethod
from .model_protocol import ModelProtocol

class WorkerProtocol(ABC):

    @abstractmethod
    def start(self):
        """
        启动任务，开始执行任务
        """
        pass

    @abstractmethod
    def recall_context(self,task,context):
        """
        回忆任务的上下文信息，用于任务的处理
        """
        pass

    @abstractmethod
    def process_task(self,task,context):
        """
        处理任务，根据上下文信息执行任务逻辑
        """
        pass

    @abstractmethod
    def save_memory(self, task_id, context_info):
        """
        保存任务的记忆或上下文信息
        """
        
        
    @abstractmethod
    def destroy(self):
        """
        销毁员工实例，释放资源
        """
        pass

